# -*- coding: utf-8 -*
'''
    Created by XiaoInk at 2021/10/10 22:48:20
    Gitee: https://gitee.com/XiaoInk
'''

import hashlib
import requests

from random import randint
from datetime import datetime


def gen_unique_str() -> str:
    '''生成唯一字符串'''
    return hashlib.md5(str(randint(0, int(datetime.now().timestamp() * 1000000))).encode('utf8')).hexdigest()


def get_wan_ip():
    '''获取当前公网IP地址'''
    return requests.get('https://checkip.amazonaws.com').text.strip()


if __name__ == '__main__':
    pass
